package com.foreveredu.erlms.domain;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/*
 * @author hushigang 2012/4/8
 * 领域模型类——报名信息
 */
@Entity
@Table(name = "enroll")
public class Enroll implements Serializable {

	private static final long serialVersionUID = 1L;
	private int id;// 编号
	private Examinee examinee;// 考生
	private Rank rank;// 报考等级
	private String name;// 姓名
	private int sex;// 性别
	private String birthday;// 出生年月日
	private String nation;// 民族
	private String profession;// 职业
	private String degree;// 文化程度
	private int keepGradeType;// 补考考生在此选择此项，保留笔试成绩，只参加上机考试；保留上机成绩，只参加笔试考试
	private String oldTicketNumber;// 原准考证号，补考 考生才需要填写此项
	private String phone;// 手机号码
	private Department dept;// 考生所在院系
	private Clazz clazz;// 班级号，例如09621
	private int isPaid;// 是否缴纳考试费用，0表示未交费，1表示已交费
	private String icon;// 上传头像
	private String loginTime;//注册日期
	private String paidTime;//交费日期

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@OneToOne(cascade=CascadeType.ALL)
	@JoinColumn(name = "examinee_id")
	public Examinee getExaminee() {
		return examinee;
	}

	public void setExaminee(Examinee examinee) {
		this.examinee = examinee;
	}

	@ManyToOne
	@JoinColumn(name = "rank_id")
	public Rank getRank() {
		return rank;
	}

	public void setRank(Rank rank) {
		this.rank = rank;
	}

	@Column
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column
	public int getSex() {
		return sex;
	}

	public void setSex(int sex) {
		this.sex = sex;
	}

	@Column
	public String getBirthday() {
		return birthday;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	@Column
	public String getNation() {
		return nation;
	}

	public void setNation(String nation) {
		this.nation = nation;
	}

	@Column
	public String getProfession() {
		return profession;
	}

	public void setProfession(String profession) {
		this.profession = profession;
	}

	@Column
	public String getDegree() {
		return degree;
	}

	public void setDegree(String degree) {
		this.degree = degree;
	}

	@Column
	public String getOldTicketNumber() {
		return oldTicketNumber;
	}

	public void setOldTicketNumber(String oldTicketNumber) {
		this.oldTicketNumber = oldTicketNumber;
	}

	@Column
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@ManyToOne
	@JoinColumn(name = "dept_id")
	public Department getDept() {
		return dept;
	}

	public void setDept(Department dept) {
		this.dept = dept;
	}

	@ManyToOne
	@JoinColumn(name = "clazz_id")
	public Clazz getClazz() {
		return clazz;
	}

	public void setClazz(Clazz clazz) {
		this.clazz = clazz;
	}

	@Column
	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	@Column
	public int getKeepGradeType() {
		return keepGradeType;
	}

	public void setKeepGradeType(int keepGradeType) {
		this.keepGradeType = keepGradeType;
	}

	@Column
	public int getIsPaid() {
		return isPaid;
	}

	public void setIsPaid(int isPaid) {
		this.isPaid = isPaid;
	}
	
	@Column
	public String getLoginTime() {
		return loginTime;
	}

	public void setLoginTime(String loginTime) {
		this.loginTime = loginTime;
	}
	
	@Column
	public String getPaidTime() {
		return paidTime;
	}

	public void setPaidTime(String paidTime) {
		this.paidTime = paidTime;
	}

}
